#include "uimodels.h"


class UIModels::UIModelsPrivate{
public:
	UIModelsPrivate();
	~UIModelsPrivate();

	ListModel *m_pListModel;
	ListModelDeleagate *m_pListDelegate;
	TableModel *m_pTableModel;
};

UIModels::UIModelsPrivate::UIModelsPrivate(){
	m_pListModel = 0;
	m_pListDelegate = 0;
	m_pTableModel = 0;
}

UIModels::UIModelsPrivate::~UIModelsPrivate(){
}

//end of d-class
//------------------------------------------------------------------------------
UIModels::UIModels(QObject *parent) :
	QObject(parent),
	d(new UIModelsPrivate())
{
}

UIModels::~UIModels(){
	delete d;
}

ListModel* UIModels::getListModel(){
	if( !d->m_pListModel ){
		d->m_pListModel = new ListModel( this );
		d->m_pListModel->fillModel();
	}
	return d->m_pListModel;
}

ListModelDeleagate* UIModels::getListDelgate(){
	if( !d->m_pListDelegate ){
		d->m_pListDelegate = new ListModelDeleagate( this );
	}
	return d->m_pListDelegate;
}

TableModel* UIModels::getTableModel(){
	if( !d->m_pTableModel ){
		d->m_pTableModel = new TableModel( this );
	}
	return d->m_pTableModel;
}
